package com.bjdd.jdy.entity;

import com.bjdd.jdy.Constant;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/5/16.
 */

public class InfoBean {

    /**
     * realName : 临街
     * idCard : 35052119950508153x
     * photo : null
     * tel : 13655945593
     * status : 已认证
     */

    private String realName;
    private String idCard;
    private String photo;
    private String tel;
    private String status;

    public static InfoBean objectFromData(String str) {

        return new Gson().fromJson(str, InfoBean.class);
    }

    public static List<InfoBean> arrayInfoBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<InfoBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getPhoto() {
        String url = Constant.IMG_URL + photo;
        return url;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
